package com.lr.service.impl;

import com.lr.domain.entity.Jobs;
import com.lr.infra.mapper.JobsMapper;
import com.lr.service.JobsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class JobsServiceImpl implements JobsService {

    @Resource
    private JobsMapper jobsMapper;

    @Override
    public List<Jobs> findJobs() {
        List<Jobs> jobs = jobsMapper.findJobs();
        System.out.println("查询成功！");
        return jobs;
    }

    @Override
    public void createJob(Jobs jobs) {
        jobsMapper.createJob(jobs);
        System.out.println("插入成功！");
    }

    @Override
    public void deleteJob(String id) {
        jobsMapper.deleteJob(id);
        System.out.println("删除成功！");
    }

    @Override
    public void updateJob(Jobs jobs) {
        jobsMapper.updateJob(jobs);
        System.out.println("更新成功！");
    }

    @Override
    public void insertBatch(List<Jobs> jobs) {
        jobsMapper.insertBatch(jobs);
        System.out.println("插入成功！");
    }

}
